<?php
$the_query = new WP_Query(array(
    'post_type' => 'banner',
    'orderby' => 'meta_value ID',
    'meta_key'  => 'thu-tu',
    'order' =>   'asc',
    'posts_per_page' => -1,
    'status' => array('publish','private'),
    'tax_query' => array(
        array(
            'taxonomy' => 'loai-banner',
            'field' => 'slug',
            'terms' => array('banner-trang-chu-trai')
        )
    )
)); ?>

<div id="banner-left" class="carousel slide fl">
    <div class="carousel-inner" >
    <?php $loop = 0; while($the_query->have_posts()) { $the_query->the_post(); $loop++;?>
        <div class="item<?php echo ($loop==1)?" active":"";?>">
            <a href="<?php echo get_post_meta($post->ID,"link",true)?>">
			<?php the_post_thumbnail("large","class=image-crop");?>
            </a>
        </div>
    <?php } wp_reset_query(); ?>
    </div>    
    <!-- Carousel nav -->
    <a class="carousel-control left" href="#banner-left" data-slide="prev">&lsaquo;</a>
    <a class="carousel-control right" href="#banner-left" data-slide="next">&rsaquo;</a>
</div>
<script>
jQuery(function($){
    $('#banner-left').carousel({
        interval: 2000
    })
});
</script>
